#!/bin/bash
echo "Start of add_conimbo_distros.sh"
echo "Unpacking Drupal (Conimbo) distributions"

DISTS=/vagrant/data/platforms

for tgz in `ls $DISTS`
do
	echo "Unpacking $dist"
	cd /var/www
	tar zfvx $DISTS/$tgz
done

mv /var/www/fedimbo-platform /var/www/conimbo-1.12-6.26

for dist in `ls -d /var/www/conimbo*`
do	
	echo "Installing selenium module"
	cd $dist/sites/all/modules
	drush dl selenium
	
	echo "Changing owner"
	chown -R www-data:www-data $dist
done

echo "End of add_conimbo_distros.sh"
